package com.ikun.yummy.bean;

import android.graphics.BitmapFactory;

import androidx.databinding.BindingAdapter;

import de.hdodenhof.circleimageview.CircleImageView;

public class CommentInfo {
    public String username="未知用户",userImg,content,reply,cookid,commentid;
    public int type=1;//1是评论布局2是回复布局
    public CommentInfo(int type,String username,String content,String reply,String userImg,String cookid,String commentid){
        this.type=type;
        this.username=username;
        this.content=content;
        this.reply=reply;
        this.userImg=userImg;
        this.cookid=cookid;
        this.commentid=commentid;
    }
    @BindingAdapter("bindUserImg")
    public static void bindUserImg(CircleImageView imageView, String  userImg){
        imageView.setImageBitmap(BitmapFactory.decodeFile(userImg));
    }
}
